//菜单
var menuOffX=0  //菜单距连接文字最左端距离
var menuOffY=39 //菜单距连接文字顶端距离

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
function ShowMenu(e,vmenu,mod){
    which=vmenu
    menuobj=document.getElementById("popmenu")
    menuobj.thestyle=menuobj.style
    menuobj.innerHTML=which
    menuobj.contentwidth=menuobj.offsetWidth
    eventX=e.clientX
    eventY=e.clientY
    var rightedge=document.body.clientWidth-eventX
    var bottomedge=document.body.clientHeight-eventY

        //which!=Qywh条件是2010-06-09修改企业文化时加入的，原版只有一个rightedge<menuobj.contentwidth条件
        //加入which!=Qywh条件是为了将企业文化的下级菜单调整至右边显示，原来的是显示在左边
        if (rightedge<menuobj.contentwidth&&which!=Qywh)
            menuobj.thestyle.left=document.body.scrollLeft+eventX-menuobj.contentwidth+menuOffX
    
        else
            menuobj.thestyle.left=ie4? ie_x(event.srcElement)+menuOffX : ns6? window.pageXOffset+eventX : eventX
        
        if (bottomedge<menuobj.contentheight&&mod!=0)
            menuobj.thestyle.top=document.body.scrollTop+eventY-menuobj.contentheight-event.offsetY+menuOffY-23
        else
            menuobj.thestyle.top=ie4? ie_y(event.srcElement)+menuOffY : ns6? window.pageYOffset+eventY+10 : eventY

    menuobj.thestyle.visibility="visible"
}


function ie_y(e){  
    var t=e.offsetTop;  
    while(e=e.offsetParent){  
        //t+=e.offsetTop;  
        t+=e.offsetTop;
    }  
    return t;  
}  
function ie_x(e){  
    var l=e.offsetLeft;  
    while(e=e.offsetParent){  
        l+=e.offsetLeft;  
    }  
    return l;  
}

function highlightmenu(e,state){
    if (document.all)
        source_el=event.srcElement
        while(source_el.id!="popmenu"){
            source_el=document.getElementById? source_el.parentNode : source_el.parentElement
            if (source_el.className=="menuitems"){
                source_el.id=(state=="on")? "mouseoverstyle" : ""
        }
    }
}
function hidemenu(){if (window.menuobj)menuobj.thestyle.visibility="hidden"}
function dynamichide(e){if ((ie4||ns6)&&!menuobj.contains(e.toElement))hidemenu()}
document.onclick=hidemenu
document.write("<div class=menuskin id=popmenu onmouseover=highlightmenu(event,'on') onmouseout=highlightmenu(event,'off');dynamichide(event)></div>");
//菜单

//集团概况/领导团队公司简介公司荣誉发展历程



//<!--
//图片按比例缩放
var flag=false;
function DrawImage(ImgD){
var image=new Image();
var iwidth = 160; //定义允许图片宽度，当宽度大于这个值时等比例缩小
var iheight = 110; //定义允许图片高度，当宽度大于这个值时等比例缩小
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= iwidth/iheight){
if(image.width>iwidth){ 
ImgD.width=iwidth;
ImgD.height=(image.height*iwidth)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}

ImgD.alt=image.width+"×"+image.height;
}
else{
if(image.height>iheight){ 
ImgD.height=iheight;
ImgD.width=(image.width*iheight)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
}
ImgD.style.display="block";
} 
//调用：<img src="图片" onload="javascript:DrawImage(this)">
//-->



